package site.isscloud.project.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import site.isscloud.common.annotation.Excel;
import site.isscloud.common.core.domain.BaseEntity;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 告警记录对象 pj_alarm_record
 */
public class PjAlarmRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** id */
    @Excel(name = "ID")
    private Long id;

    /** 报警源id */
    @Excel(name = "报警源ID")
    private Long sId;

    /** 设备号 */
    @Excel(name = "设备号")
    private String deviceNo;

    /** 通道，0=通道1, 98=激光器故障 */
    @Excel(name = "通道")
    private Integer chanel;

    /** 报警类型：1=断纤告警, 2=激光器故障, 3=温度 */
    @Excel(name = "报警类型", dictType = "alarm_type")
    private Integer alarmType;

    /** 报警源报警时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "报警源报警时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date sCreateDatetime;

    /** 断纤告警位置 */
    @Excel(name = "断纤告警位置")
    private Integer fiberBreakPosition;

    /** 激光器温度 */
    @Excel(name = "激光器温度")
    private Integer laserTemperature;

    /** 报警米标 */
    @Excel(name = "报警米标")
    private Integer meterMark;

    /** 报警状态 */
    @Excel(name = "报警状态")
    private Integer meterAlarmStatus;

    /** 报警时刻温度 */
    @Excel(name = "报警时刻温度")
    private BigDecimal meterAlarmTemperature;

    /** MQTT原始报文 */
    @Excel(name = "MQTT原始报文")
    private String sData;

    /** 状态：0=活跃中；1=已关闭；2=已处理 */
    @Excel(name = "状态", dictType = "alarm_state")
    private Integer state;

    // 查询字段 - 米标范围
    private Integer minMeterMark;
    private Integer maxMeterMark;

    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public Long getSId() { return sId; }
    public void setSId(Long sId) { this.sId = sId; }
    public String getDeviceNo() { return deviceNo; }
    public void setDeviceNo(String deviceNo) { this.deviceNo = deviceNo; }
    public Integer getChanel() { return chanel; }
    public void setChanel(Integer chanel) { this.chanel = chanel; }
    public Integer getAlarmType() { return alarmType; }
    public void setAlarmType(Integer alarmType) { this.alarmType = alarmType; }
    public Date getSCreateDatetime() { return sCreateDatetime; }
    public void setSCreateDatetime(Date sCreateDatetime) { this.sCreateDatetime = sCreateDatetime; }
    public Integer getFiberBreakPosition() { return fiberBreakPosition; }
    public void setFiberBreakPosition(Integer fiberBreakPosition) { this.fiberBreakPosition = fiberBreakPosition; }
    public Integer getLaserTemperature() { return laserTemperature; }
    public void setLaserTemperature(Integer laserTemperature) { this.laserTemperature = laserTemperature; }
    public Integer getMeterMark() { return meterMark; }
    public void setMeterMark(Integer meterMark) { this.meterMark = meterMark; }
    public Integer getMeterAlarmStatus() { return meterAlarmStatus; }
    public void setMeterAlarmStatus(Integer meterAlarmStatus) { this.meterAlarmStatus = meterAlarmStatus; }
    public BigDecimal getMeterAlarmTemperature() { return meterAlarmTemperature; }
    public void setMeterAlarmTemperature(BigDecimal meterAlarmTemperature) { this.meterAlarmTemperature = meterAlarmTemperature; }
    public String getSData() { return sData; }
    public void setSData(String sData) { this.sData = sData; }
    public Integer getState() { return state; }
    public void setState(Integer state) { this.state = state; }
    public Integer getMinMeterMark() { return minMeterMark; }
    public void setMinMeterMark(Integer minMeterMark) { this.minMeterMark = minMeterMark; }
    public Integer getMaxMeterMark() { return maxMeterMark; }
    public void setMaxMeterMark(Integer maxMeterMark) { this.maxMeterMark = maxMeterMark; }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("sId", getSId())
                .append("deviceNo", getDeviceNo())
                .append("chanel", getChanel())
                .append("alarmType", getAlarmType())
                .append("sCreateDatetime", getSCreateDatetime())
                .append("createTime", getCreateTime())
                .append("fiberBreakPosition", getFiberBreakPosition())
                .append("laserTemperature", getLaserTemperature())
                .append("meterMark", getMeterMark())
                .append("meterAlarmStatus", getMeterAlarmStatus())
                .append("meterAlarmTemperature", getMeterAlarmTemperature())
                .append("sData", getSData())
                .append("state", getState())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}